package com.ruoyi.medical.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.medical.mapper.PrescriptionItemMapper;
import com.ruoyi.medical.domain.PrescriptionItem;
import com.ruoyi.medical.service.IPrescriptionItemService;

/**
 * 药品处方管理Service业务层处理
 * 
 * @author WGH
 * @date 2025-08-15
 */
@Service
public class PrescriptionItemServiceImpl implements IPrescriptionItemService 
{
    @Autowired
    private PrescriptionItemMapper prescriptionItemMapper;

    /**
     * 查询药品处方管理
     * 
     * @param id 药品处方管理主键
     * @return 药品处方管理
     */
    @Override
    public PrescriptionItem selectPrescriptionItemById(Long id)
    {
        return prescriptionItemMapper.selectPrescriptionItemById(id);
    }

    /**
     * 查询药品处方管理列表
     * 
     * @param prescriptionItem 药品处方管理
     * @return 药品处方管理
     */
    @Override
    public List<PrescriptionItem> selectPrescriptionItemList(PrescriptionItem prescriptionItem)
    {
        return prescriptionItemMapper.selectPrescriptionItemList(prescriptionItem);
    }

    /**
     * 新增药品处方管理
     * 
     * @param prescriptionItem 药品处方管理
     * @return 结果
     */
    @Override
    public int insertPrescriptionItem(PrescriptionItem prescriptionItem)
    {
        return prescriptionItemMapper.insertPrescriptionItem(prescriptionItem);
    }

    /**
     * 修改药品处方管理
     * 
     * @param prescriptionItem 药品处方管理
     * @return 结果
     */
    @Override
    public int updatePrescriptionItem(PrescriptionItem prescriptionItem)
    {
        return prescriptionItemMapper.updatePrescriptionItem(prescriptionItem);
    }

    /**
     * 批量删除药品处方管理
     * 
     * @param ids 需要删除的药品处方管理主键
     * @return 结果
     */
    @Override
    public int deletePrescriptionItemByIds(Long[] ids)
    {
        return prescriptionItemMapper.deletePrescriptionItemByIds(ids);
    }

    /**
     * 删除药品处方管理信息
     * 
     * @param id 药品处方管理主键
     * @return 结果
     */
    @Override
    public int deletePrescriptionItemById(Long id)
    {
        return prescriptionItemMapper.deletePrescriptionItemById(id);
    }
}
